package com.ruoyi.web.controller.config;


import com.ruoyi.system.mapper.UserWorksMapper;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class GenImgCountDailyRefresh {


    @Autowired
    private UserWorksMapper userWorksMapper;

    @Scheduled(cron = "0 0 0 * * ?")
    public void refreshCount() {
        userWorksMapper.addUserGenImgCount();
        System.out.println("执行刷新计数任务，当前时间：" + System.currentTimeMillis());
    }



}
